fix: correct tryCatch handler signature and make flow-typed install non-fatal#105
Closed
fix: correct tryCatch handler signature and make flow-typed install non-fatal#105
Conversation
…on-fatal - R/shinyModule.R: fix `error = function()` -> `error = function(e)` in `test_shiny_version()`. The handler must accept the condition argument passed by tryCatch, otherwise R throws "unused argument (cond)" when shiny is unavailable (e.g. in check-depends-only mode). - bin/postinstall.sh: append `|| true` to `flow-typed install` so that transient GitHub API failures during cache fetch don't abort the postinstall script and block the routine CI job. Agent-Logs-Url: https://github.com/rstudio/reactlog/sessions/b3ba1985-0e25-4de9-9e09-23b064266fe3 Co-authored-by: karangattu <4220325+karangattu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing package checks for reactlog on main
fix: correct tryCatch handler signature and make flow-typed install non-fatal
Apr 27, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two distinct CI failures on
mainare addressed here: a brokentryCatcherror handler that surfaces only whenshinyis absent (e.g.check-depends-onlymode), and apostinstall.shstep that hard-fails whenever theflow-typedGitHub cache fetch encounters an API error.Changes
R/shinyModule.R—test_shiny_version()usederror = function()with no parameters. R passes the caught condition as the first argument to handlers; a zero-parameter handler throwsunused argument (cond)instead of returningFALSE. Only manifests whenshinyis not installed (Suggests, not Imports).bin/postinstall.sh—flow-typed installfetches a type-definition cache from the GitHub API; transient failures (rate limits, network errors) caused the entireyarn installto abort. Appended|| trueto make it non-fatal.